{
  "nbformat": 4,
  "nbformat_minor": 0,
  "metadata": {
    "colab": {
      "name": "GEN_3_learning_rate.ipynb",
      "provenance": [],
      "authorship_tag": "ABX9TyPhmQE7bYbcMi9rCRbBW+UV",
      "include_colab_link": true
    },
    "kernelspec": {
      "name": "python3",
      "display_name": "Python 3"
    }
  },
  "cells": [
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "view-in-github",
        "colab_type": "text"
      },
      "source": [
        "<a href=\"https://colab.research.google.com/github/cxbxmxcx/GenReality/blob/master/GEN_3_learning_rate.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "XhB46Q8JTpBd"
      },
      "source": [
        "from sklearn.model_selection import train_test_split\n",
        "\n",
        "import numpy  as np\n",
        "import matplotlib.pyplot as plt\n",
        "\n",
        "import torch\n",
        "import torch.nn as nn"
      ],
      "execution_count": 1,
      "outputs": []
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "9ITk0PPQb67p"
      },
      "source": [
        "def function(X):\n",
        "  return X * X + 5."
      ],
      "execution_count": 2,
      "outputs": []
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "tNHQgiXUUFIa",
        "outputId": "819a8013-be64-4809-b4ac-c42ecb135dc2",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 283
        }
      },
      "source": [
        "X = np.array([[1.],[2.],[3.],[4.],[5.],[6.],[7.],[8.],[9.],[10.]])\n",
        "y = function(X)\n",
        "inputs = X.shape[1]\n",
        "y = y.reshape(-1, 1)\n",
        "plt.plot(X, y, 'o', color='black')"
      ],
      "execution_count": 3,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "[<matplotlib.lines.Line2D at 0x7efcee5980b8>]"
            ]
          },
          "metadata": {
            "tags": []
          },
          "execution_count": 3
        },
        {
          "output_type": "display_data",
          "data": {
            "image/png": "iVBORw0KGgoAA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G1+UfTczD+zMLDOfBX4RETfVQ0eBJ1uM1LY14NaI6NS/N0c5wF8w1x4GjtX3jwEPzeuNLffmbgM+yMYs9Yf1z7vaDqWF8RGgiogfAX8J/FPLeVpT/wfzAPA48GM2+ufAnIogIu4H/gu4KSJOR8SdwD3A30TEU2z8Z3PP3D7P0w9IUnmcuUtSgSx3SSqQ5S5JBbLcJalAlrskFchyl6QCWe6SVKD/AwQwgL9pur8aAAAAAElFTkSuQmCC\n",
            "text/plain": [
              "<Figure size 432x288 with 1 Axes>"
            ]
          },
          "metadata": {
            "tags": [],
            "needs_background": "light"
          }
        }
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "z05ZyUrmU7is",
        "outputId": "f40fd718-3039-4e2b-8ee7-c22a3ad060c1",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 35
        }
      },
      "source": [
        "X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=0)\n",
        "num_train = X_train.shape[0]\n",
        "X_train[:2], y_train[:2]\n",
        "num_train"
      ],
      "execution_count": 4,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "8"
            ]
          },
          "metadata": {
            "tags": []
          },
          "execution_count": 4
        }
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "QLshQolGVUlz"
      },
      "source": [
        "torch.set_default_dtype(torch.float64)\n",
        "net = nn.Sequential(\n",
        "    nn.Linear(inputs, 50, bias = True), nn.ReLU(),\n",
        "    nn.Linear(50, 50, bias = True), nn.ReLU(),\n",
        "    nn.Linear(50, 50, bias = True), nn.Sigmoid(),\n",
        "    nn.Linear(50, 1)\n",
        ")\n",
        "loss_fn = nn.MSELoss()\n",
        "optimizer = torch.optim.Adam(net.parameters(), lr = .001)"
      ],
      "execution_count": 5,
      "outputs": []
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "ZhR9h8Y3WCWM"
      },
      "source": [
        "num_epochs = 8000\n",
        "y_train_t = torch.from_numpy(y_train).clone().reshape(-1, 1)\n",
        "x_train_t = torch.from_numpy(X_train).clone()\n",
        "y_test_t = torch.from_numpy(y_test).clone().reshape(-1, 1)\n",
        "x_test_t = torch.from_numpy(X_test).clone()\n",
        "history = []"
      ],
      "execution_count": 6,
      "outputs": []
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "Ef62jrN3WP0d",
        "outputId": "1f36818d-610d-411e-d4ab-55c4e9400e88",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 1000
        }
      },
      "source": [
        "for i in range(num_epochs):\n",
        "    y_pred = net(x_train_t)\n",
        "    loss = loss_fn(y_train_t,y_pred)\n",
        "    history.append(loss.data)    \n",
        "    loss.backward()\n",
        "    optimizer.step()\n",
        "    optimizer.zero_grad()  \n",
        "    test_loss = loss_fn(y_test_t,net(x_test_t))  \n",
        "    if i > 0 and i % 100 == 0:\n",
        "        print(f'Epoch {i}, loss = {loss:.3f}, test loss {test_loss:.3f}')"
      ],
      "execution_count": 7,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "Epoch 100, loss = 2326.371, test loss 3305.982\n",
            "Epoch 200, loss = 2099.660, test loss 3027.314\n",
            "Epoch 300, loss = 1894.562, test loss 2776.022\n",
            "Epoch 400, loss = 1718.154, test loss 2559.554\n",
            "Epoch 500, loss = 1561.272, test loss 2366.447\n",
            "Epoch 600, loss = 1422.444, test loss 2194.331\n",
            "Epoch 700, loss = 1299.460, test loss 2022.774\n",
            "Epoch 800, loss = 1188.404, test loss 1869.735\n",
            "Epoch 900, loss = 1087.801, test loss 1728.369\n",
            "Epoch 1000, loss = 997.357, test loss 1594.805\n",
            "Epoch 1100, loss = 916.060, test loss 1470.571\n",
            "Epoch 1200, loss = 841.451, test loss 1354.637\n",
            "Epoch 1300, loss = 773.234, test loss 1246.434\n",
            "Epoch 1400, loss = 711.204, test loss 1145.769\n",
            "Epoch 1500, loss = 655.072, test loss 1052.452\n",
            "Epoch 1600, loss = 604.466, test loss 966.158\n",
            "Epoch 1700, loss = 557.530, test loss 885.324\n",
            "Epoch 1800, loss = 514.139, test loss 809.658\n",
            "Epoch 1900, loss = 474.177, test loss 739.101\n",
            "Epoch 2000, loss = 437.540, test loss 673.455\n",
            "Epoch 2100, loss = 404.115, test loss 612.600\n",
            "Epoch 2200, loss = 373.763, test loss 556.337\n",
            "Epoch 2300, loss = 346.342, test loss 504.175\n",
            "Epoch 2400, loss = 321.005, test loss 453.515\n",
            "Epoch 2500, loss = 297.054, test loss 406.482\n",
            "Epoch 2600, loss = 274.646, test loss 363.355\n",
            "Epoch 2700, loss = 253.772, test loss 323.465\n",
            "Epoch 2800, loss = 234.416, test loss 286.667\n",
            "Epoch 2900, loss = 216.554, test loss 252.865\n",
            "Epoch 3000, loss = 200.132, test loss 221.530\n",
            "Epoch 3100, loss = 185.126, test loss 192.300\n",
            "Epoch 3200, loss = 171.476, test loss 165.716\n",
            "Epoch 3300, loss = 159.125, test loss 142.117\n",
            "Epoch 3400, loss = 147.683, test loss 120.780\n",
            "Epoch 3500, loss = 136.396, test loss 100.898\n",
            "Epoch 3600, loss = 125.547, test loss 82.852\n",
            "Epoch 3700, loss = 115.147, test loss 66.696\n",
            "Epoch 3800, loss = 105.221, test loss 52.876\n",
            "Epoch 3900, loss = 95.778, test loss 40.126\n",
            "Epoch 4000, loss = 86.832, test loss 29.326\n",
            "Epoch 4100, loss = 78.391, test loss 20.542\n",
            "Epoch 4200, loss = 70.460, test loss 13.225\n",
            "Epoch 4300, loss = 63.041, test loss 7.672\n",
            "Epoch 4400, loss = 56.132, test loss 3.923\n",
            "Epoch 4500, loss = 49.727, test loss 1.618\n",
            "Epoch 4600, loss = 43.820, test loss 0.878\n",
            "Epoch 4700, loss = 38.443, test loss 1.328\n",
            "Epoch 4800, loss = 33.454, test loss 3.335\n",
            "Epoch 4900, loss = 28.965, test loss 6.533\n",
            "Epoch 5000, loss = 24.917, test loss 10.449\n",
            "Epoch 5100, loss = 21.289, test loss 14.691\n",
            "Epoch 5200, loss = 18.058, test loss 20.195\n",
            "Epoch 5300, loss = 15.200, test loss 27.541\n",
            "Epoch 5400, loss = 12.692, test loss 33.679\n",
            "Epoch 5500, loss = 10.508, test loss 39.806\n",
            "Epoch 5600, loss = 8.625, test loss 44.251\n",
            "Epoch 5700, loss = 7.006, test loss 59.176\n",
            "Epoch 5800, loss = 5.637, test loss 66.072\n",
            "Epoch 5900, loss = 4.487, test loss 75.556\n",
            "Epoch 6000, loss = 3.532, test loss 79.852\n",
            "Epoch 6100, loss = 2.747, test loss 90.720\n",
            "Epoch 6200, loss = 2.110, test loss 92.499\n",
            "Epoch 6300, loss = 1.599, test loss 104.590\n",
            "Epoch 6400, loss = 1.197, test loss 100.461\n",
            "Epoch 6500, loss = 0.880, test loss 115.652\n",
            "Epoch 6600, loss = 0.638, test loss 123.323\n",
            "Epoch 6700, loss = 0.455, test loss 118.910\n",
            "Epoch 6800, loss = 0.319, test loss 129.954\n",
            "Epoch 6900, loss = 0.219, test loss 136.193\n",
            "Epoch 7000, loss = 0.148, test loss 126.126\n",
            "Epoch 7100, loss = 0.098, test loss 136.834\n",
            "Epoch 7200, loss = 0.063, test loss 142.509\n",
            "Epoch 7300, loss = 0.054, test loss 123.703\n",
            "Epoch 7400, loss = 0.025, test loss 128.558\n",
            "Epoch 7500, loss = 0.015, test loss 137.098\n",
            "Epoch 7600, loss = 0.009, test loss 141.864\n",
            "Epoch 7700, loss = 0.005, test loss 144.929\n",
            "Epoch 7800, loss = 0.003, test loss 146.900\n",
            "Epoch 7900, loss = 0.002, test loss 106.965\n"
          ],
          "name": "stdout"
        }
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "IifIajH-XFrl",
        "outputId": "07aed041-1150-4843-8683-a3f8bf19c029",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 283
        }
      },
      "source": [
        "plt.plot(history)"
      ],
      "execution_count": 8,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "[<matplotlib.lines.Line2D at 0x7efced87d470>]"
            ]
          },
          "metadata": {
            "tags": []
          },
          "execution_count": 8
        },
        {
          "output_type": "display_data",
          "data": {
            "image/png": "iVBORw0KGgoAAAANSUhEUgAAAX0AAAD4CAYAAAAAczaOAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+WH4yJAAAgAElEQVR4nO3de3xU9Z3/8ddncr+QGwkBEi4Bo1wEASMiorVWBWyrtrZdbGvZ1l1stdff7q8/7W63l334W7e/tla71oroVrtWbaurVGktUn71hkBQ7iAJ90TIhUsSArnOd/+YExyQACGTnMnM+/l4nMec8z1nzvmEGd7nzHfOnGPOOUREJD4E/C5ARET6j0JfRCSOKPRFROKIQl9EJI4o9EVE4kii3wWcTn5+vhs9erTfZYiIDChr1qypd84VnGpeVIf+6NGjKS8v97sMEZEBxcx2dzdP3TsiInFEoS8iEkcU+iIicUShLyISRxT6IiJxRKEvIhJHFPoiInEkJkO/saWd+5ZuY+3ew36XIiISVWIy9F0Q7l9WQfmug36XIiISVWIy9LPSEkkMGAea2/wuRUQkqsRk6JsZuRnJHDyi0BcRCReToQ8wOCNZR/oiIieJ3dDPTOZgc6vfZYiIRJWYDf28jBQO6khfROQEMRv66t4REfmgmA39/Mxkmlo6aGnv9LsUEZGoEbOhPyQrFYC6JvXri4h0idnQL/RCv6axxedKRESiRwyHfgoANY060hcR6RK7oT9IR/oiIieL2dDPSU8iOSFATZNCX0SkS8yGvpkxJCuFOnXviIgcd8bQN7MRZrbczDab2SYz+4bX/n0zqzaztd5wfdhz7jazSjN718xmh7XP8doqzeyuvvmT3jdkUIqO9EVEwiSexTIdwD845942s0HAGjNb6s27zzn34/CFzWwCMA+YCAwHXjGz873ZDwLXAlXAajNb7JzbHIk/5FQKs1KpqD3SV6sXERlwznik75zb55x72xtvArYARad5yo3A0865VufcTqASmO4Nlc65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OW2RmGVFQV7h5wFPeuK91OeeqgR8De4B9hN4va+jn91cshn7UcaHdsW/nxppZJvAs8E3nXGP4PL9qc851OuemEDqyng6M6+8aTmZmHwNqnXNr/K7lFGY556YBc4E7zezK8Jk+vY6JhLo1H3LOTQWaCXWb+F0XAF7f+A3A706e50dd3ncINxLaWQ4HMoA5/VkDxGboR8vN12vMbBiA91jrtXdXX5/UbWZJhAL/Sefcc9FUG4Bz7jCwnNDH2hwz67qbW/g2jm/fm58NHOiDui4HbjCzXcDThLp47o+CurqOEnHO1QL/TWhH6ffrWAVUOQxbm0wAAAGuSURBVOdWetO/J7QT8LuuLnOBt51zNd6033VdA+x0ztU559qB5wi95/r1/RWLoR8tN19fDHR92z+fUH96V/sXvDMGZgAN3kfOl4HrzCzXOyK4zms7Z2ZmwKPAFufcT6OlNjMrMLMcbzyN0PcMWwiF/6e6qaur3k8Bf/GO1BYD87yzHEqAUmDVudblnLvbOVfsnBtN6H3zF+fc5/yuy8wyzGxQ1zihf/+N+Pw6Ouf2A3vN7AKv6SPAZr/rCnML73ftdG3fz7r2ADPMLN37v9n179W/769IfFkSbQOhb+O3Eeon/qd+2N5ThPro2gkd/dxGqO9tGVABvALkecsa8KBX2wagLGw9XwIqveGLEahrFqGPsOuBtd5wvd+1AZOBd7y6NgL/4rWP8d68lYQ+kqd47anedKU3f0zYuv7Jq/ddYG4EX9OreP/sHV/r8ra/zhs2db2n/X4dvfVNAcq91/J5Qme5RENdGYSOirPD2qKhrh8AW733/a8JnYHTr+8vXYZBRCSOxGL3joiIdEOhLyISRxT6IiJxRKEvIhJHFPoiInFEoS8iEkcU+iIiceR/ANTP2oax5bKgAAAAAElFTkSuQmCC\n",
            "text/plain": [
              "<Figure size 432x288 with 1 Axes>"
            ]
          },
          "metadata": {
            "tags": [],
            "needs_background": "light"
          }
        }
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "ZJXQixjLhDkt",
        "outputId": "6635c237-b51f-4e04-aeb9-9fe1415d8958",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 283
        }
      },
      "source": [
        "X_a = torch.rand(25,1).clone() * 9\n",
        "y_a = net(X_a)\n",
        "y_a = y_a.detach().numpy()\n",
        "plt.plot(X_a, y_a, 'o', color='black')"
      ],
      "execution_count": 9,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "[<matplotlib.lines.Line2D at 0x7efced7f07f0>]"
            ]
          },
          "metadata": {
            "tags": []
          },
          "execution_count": 9
        },
        {
          "output_type": "display_data",
          "data": {
            "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAD4CAYAAAAXUaZHAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+WH4yJAAARnklEQVR4nO3db2xk1X3G8edZG5QMabOwayGyi2dWAiWKIlHAQqRIUQVUIn8UeJFEVN6UApIF25IlqQQk84JXrogaNdlK3UWjkHQbj9JEGyRQFKWNCFXVF1nVCyj82VSsiMcsXcBsIEQdqYT1ry98h9resdf2HfvOnPv9SJY9Z8Zzfxrwo7Pn3nt+jggBANKyregCAAC9R7gDQIIIdwBIEOEOAAki3AEgQcNFFyBJO3fujFqtVnQZADBQjh079kZEjHR7ri/CvVaraXp6uugyAGCg2G6t9BzLMgCQIMIdABJEuANAggh3AEjQOcPd9ndsv277uUVjF9n+me0Xs+8XZuO2/fe2T9j+pe2rNrN4AEB3a5m5/6Okm5aNPSDpiYi4XNIT2WNJ+qSky7OvCUmHelMmAKSl2WyqVqtp27ZtqtVqajabPX3/c4Z7RPy7pN8sG75Z0uHs58OSblk0/k+x4BeSttu+pFfFAkAKms2mJiYm1Gq1FBFqtVqamJjoacBvdM394og4lf38qqSLs593SXp50etOZmNnsT1he9r29Nzc3AbLAIDBU6/X1W63l4y1223V6/WeHSP3CdVY2BB+3ZvCR0Q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IdABJEuANAggh3AEjQ/wH3MWgPZUBB8QAAAABJRU5ErkJggg==\n",
            "text/plain": [
              "<Figure size 432x288 with 1 Axes>"
            ]
          },
          "metadata": {
            "tags": [],
            "needs_background": "light"
          }
        }
      ]
    }
  ]
}